package com.ihr360.commons.model.type;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ihr360.commons.model.annotation.EnumData;
import com.ihr360.commons.serializer.jackson.EnumDataSerializer;
/**
 * http://www.baeldung.com/jackson-serialize-enums
 * http://www.baeldung.com/jackson-annotations
 */

@EnumData
@JsonSerialize(using = EnumDataSerializer.class)
public enum FieldSource {
	INPUT("输入"),
	FUNCTION("公式");

	private String title;

	@JsonCreator
	public static FieldSource factory(@JsonProperty(value = "id") String id) {
		return FieldSource.valueOf(id);
	}

	FieldSource(String title) {
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}


}